import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        phone[] arr = new phone[3];
        Scanner in = new Scanner(System.in);
        double sum = 0;
        System.out.println("请输入手机数据:");
        for (int i = 0; i < arr.length; i++) {
            phone p = new phone();
            System.out.print("名称:");
            p.setName(in.next());
            System.out.print("价格:");
            p.setPrice(in.nextDouble());
            System.out.print("颜色:");
            p.setColor(in.next());
            arr[i] = p;
        }
        for (int j = 0; j < arr.length; j++) {
            sum += arr[j].getPrice();
        }
        System.out.println("三款手机的均价为:"+sum/3);
        for (int k = 0; k < arr.length; k++) {
            if(arr[k].getPrice()<sum/3){
                System.out.println(arr[k].getName()+"价格比均价低");
            }
        }
    }
}